home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / private / _findwin.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-18  |  1.1 KB  |  52 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifdef    REGISTERWINDOWS
  5. #ifdef PDCDEBUG
  6. char *rcsid__findwin = "$Header: C:\CURSES\private\RCS\_findwin.c 2.1 1993/06/18 20:23:16 MH Rel MH $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   PDC_findwin()    - Find a window in the visible windows list.
  15.  
  16.   PDCurses Description:
  17.      This is a private PDCurses routine.
  18.  
  19.      This routine is a part of the developing window registration
  20.      system that will reach maturity soon.
  21.  
  22.      This routine returns the passed WINDOW*'s WINDS pointer.
  23.  
  24.   PDCurses Return Value:
  25.      This function returns OK on success and ERR on error.
  26.  
  27.   PDCurses Errors:
  28.      No errors are defined for this function.
  29.  
  30.   Portability:
  31.      PDCurses    WINDS* PDC_findwin( WINDOW* win );
  32.  
  33. **man-end**********************************************************************/
  34.  
  35. WINDS*    PDC_findwin(WINDOW *win)
  36. {
  37.     WINDS*    next = _cursvar.visible;
  38.  
  39. #ifdef PDCDEBUG
  40.     if (trace_on) PDC_debug("PDC_findwin() - called\n");
  41. #endif
  42.  
  43.     while (next != (WINDS *)NULL)
  44.     {
  45.         if (next->w == win)
  46.             break;
  47.         next = next->next;
  48.     }
  49.     return( next );
  50. }
  51. #endif
  52.